<?php /* Smarty version 2.6.11, created on 2011-07-04 11:05:44
         compiled from column_index.php */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'default', 'column_index.php', 223, false),)), $this); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="style/css/common.css" type="text/css" />
<LINK href="style/css/ui-lightness/jquery-ui-1.8.8.custom.css" type=text/css rel=stylesheet>
<title>管理区域</title>

<SCRIPT src="style/js/jquery-1.4.2.min.js" type=text/javascript></SCRIPT>
<SCRIPT src="style/js/jquery-ui-1.8.6.custom.min.js" type=text/javascript></SCRIPT>
<SCRIPT src="style/js/ckeditor/ckfinder/ckfinder.js" type=text/javascript></SCRIPT>
<SCRIPT src="style/js/ckeditor/ckeditor.js" type=text/javascript></SCRIPT>
<SCRIPT src="style/js/main.js" type=text/javascript></SCRIPT>

<link href="style/js/Pager.css" rel="stylesheet" type="text/css" />
<script src="style/js/jquery.pager.js" type="text/javascript"></script>
<script src="style/js/jquery.simpletip-1.3.1.pack.js" type="text/javascript"></script>
<script language="javascript">
$(document).ready(function(){
	$(".editlink").click(function(){
		//var linkurl = $(this).column("href");
		
		//window.open(linkurl, "a", "toolbar=no,location=no,directories=no,menubar=no,scrollbars=1,resizable=1,status=no,top=0,left=0");
		//newW.location = ;
		//return false;
	});
	//$(".articleSet").simpletip({content:'点击以设置/取消属性',fixed:false,});
	//$(".article").simpletip({content:'点击打开快速编辑框',fixed:false,});
	$(".cbg").hover(function(){$(this).css("background-color","#F3F8F7")},function(){$(this).css("background-color","")});	
});
</script>
</head>

<body>
<div id="man_zone">
  <div id="tabs">
	<ul>
		<li><a href="#tabs-1">列表</a></li>
		<li><a href="#tabs-2">栏目属性</a></li>
	</ul>
 <div id="tabs-1" style="padding-left:0.2em;padding-right:0.4em;">
 <div style="clear:both;">
 <span style="padding-left:5px;float:left; color:green;" class="button">
 栏目名:<?php echo $this->_tpl_vars['column']['classname']; ?>

 </span>
 <span style="padding-left:5px;float:left" class="button">
 <a href="index.php?m=website&a=attribute&wid=<?php echo $this->_tpl_vars['column']['wid']; ?>
"  target="mainFrame">网站属性</a>
 </span>
 <span style="padding-left:5px;float:left">
 <?php $this->assign('modid', $this->_tpl_vars['column']['modid']); ?>
 <a href="index.php?m=<?php echo $this->_tpl_vars['mode'][$this->_tpl_vars['modid']]['tbname']; ?>
&a=add&classid=<?php echo $this->_tpl_vars['column']['classid']; ?>
&wid=<?php echo $this->_tpl_vars['column']['wid']; ?>
" class="button">增加信息</a>
 </span>
   
  <span style="padding-left:5px;float:left">
  <a href="index.php?m=system&a=preview&wid=<?php echo $this->_tpl_vars['column']['wid']; ?>
" class="button" target="_blank">预览首页</a> <a href="index.php?m=system&a=preview&classid=<?php echo $this->_tpl_vars['column']['classid']; ?>
&wid=<?php echo $this->_tpl_vars['column']['wid']; ?>
" target="_blank" class="button">预览栏目</a></span>
  <span style="padding-left:50px;float:left">
  <select name="" id="make">
  	<option value="index.php?m=system&a=make&wid=<?php echo $this->_tpl_vars['column']['wid']; ?>
&action=index">生成首页</option>
    <option value="index.php?m=system&a=make&wid=<?php echo $this->_tpl_vars['column']['wid']; ?>
&classid=<?php echo $this->_tpl_vars['column']['classid']; ?>
&action=column">生成当前栏目页</option>
    <option value="index.php?m=system&a=make&wid=<?php echo $this->_tpl_vars['column']['wid']; ?>
&classid=wid&action=column">生成所有栏目页</option>
    <option value="index.php?m=system&a=make&wid=<?php echo $this->_tpl_vars['column']['wid']; ?>
&classid=<?php echo $this->_tpl_vars['column']['classid']; ?>
&action=page&id=classid">生成当前栏目所有文章</option>
    
    
    <option value="index.php?m=system&a=make&wid=<?php echo $this->_tpl_vars['column']['wid']; ?>
&classid=<?php echo $this->_tpl_vars['column']['classid']; ?>
&action=index,column">生成首页和当前栏目页</option>
    <option value="index.php?m=system&a=make&wid=<?php echo $this->_tpl_vars['column']['wid']; ?>
&classid=wid&action=index,column">生成首页和所有栏目页</option>
    
    <option value="index.php?m=system&a=make&wid=<?php echo $this->_tpl_vars['column']['wid']; ?>
&classid=<?php echo $this->_tpl_vars['column']['classid']; ?>
&action=page,column&id=classid">生成当前栏目和所有文章</option>
    <option value="index.php?m=system&a=make&wid=<?php echo $this->_tpl_vars['column']['wid']; ?>
&action=index,page,column&classid=wid&id=wid">全站生成</option>
  </select>
  <input name="" type="button" value="生成"  class="make" onclick='window.open(document.getElementById("make").value, "win");' />
 </span>
  <span style="padding-left:50px;float:left">
  <form action="" method="get">
  <input name="value" type="text" class="size" value="<?php echo $this->_tpl_vars['value']; ?>
" />
   <select name="field">
  	<option value="title"<?php if ($this->_tpl_vars['field'] == 'title'): ?> selected="selected"<?php endif; ?>>标题</option>
    <option value="aid"<?php if ($this->_tpl_vars['field'] == 'aid'): ?> selected="selected"<?php endif; ?>>ID</option>
    <option value="content"<?php if ($this->_tpl_vars['field'] == 'content'): ?> selected="selected"<?php endif; ?>>内容</option>
    <option value="writer"<?php if ($this->_tpl_vars['field'] == 'writer'): ?> selected="selected"<?php endif; ?>>作者</option>
  </select>
  <input type="hidden" name="classid" value="<?php echo $this->_tpl_vars['column']['classid']; ?>
" />
  <input type="hidden" name="order" value="<?php echo $this->_tpl_vars['order']; ?>
" />
  <input type="hidden" name="m" value="column" />
  <input name="" type="submit" value="搜索" />
  </form>
 </span>
 <span style="padding-left:50px;float:left">
 <form action="" method="get" style="">
   <select name="order">
  	<option value="aid asc"<?php if ($this->_tpl_vars['order'] == 'aid asc'): ?> selected="selected"<?php endif; ?>>按ID顺序排列</option>
    <option value="aid desc"<?php if ($this->_tpl_vars['order'] == 'aid desc'): ?> selected="selected"<?php endif; ?>>按ID倒序排列</option>
    <option value="posttime asc"<?php if ($this->_tpl_vars['order'] == 'posttime asc'): ?> selected="selected"<?php endif; ?>>按日期顺序排列</option>
    <option value="posttime desc"<?php if ($this->_tpl_vars['order'] == 'posttime desc'): ?> selected="selected"<?php endif; ?>>按日期倒序排列</option>
  </select>
  <input type="hidden" name="classid" value="<?php echo $this->_tpl_vars['column']['classid']; ?>
" />
  <input type="hidden" name="field" value="<?php echo $this->_tpl_vars['field']; ?>
" />
  <input type="hidden" name="value" value="<?php echo $this->_tpl_vars['value']; ?>
" />
  <input type="hidden" name="m" value="column" />
  <input name="" type="submit" value="排序" />
  </form>
 </span>
  <span style="float:right; padding-right:15px;">
  <a href="index.php?m=<?php echo $this->_tpl_vars['mode'][$this->_tpl_vars['modid']]['tbname']; ?>
&a=unaudit&&wid=<?php echo $this->_tpl_vars['column']['wid']; ?>
" style="color:red">待审核信息</a>
  </span>
 </div>
 <div style="clear:both;">
 	<?php $this->assign('mid', $this->_tpl_vars['column']['modid']); ?>
    <?php $this->assign('tbname', $this->_tpl_vars['mode'][$this->_tpl_vars['mid']]['tbname']); ?>
    <?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => ($this->_tpl_vars['tbname'])."_list.php", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
    <table width="99%" border="0" align="center"  cellpadding="3" cellspacing="1" class="table_style">
      <tr>
        <td align="center"></td>
        <td colspan="7" align="right">
        	<label><input name="" type="checkbox" value="" id="checkAll" />全选/反选</label>
            <input name="" type="button" value="生成" id="makePage" wid="<?php echo $this->_tpl_vars['column']['wid']; ?>
" classid="<?php echo $this->_tpl_vars['column']['classid']; ?>
" onclick="window.location.href='index.php?m=system&a=make&action=page&wid=<?php echo $this->_tpl_vars['column']['wid']; ?>
&classid=<?php echo $this->_tpl_vars['column']['classid']; ?>
&id='+getCheckBox()" />
        	<input name="" type="button" value="审核" id="articleAudit" />
            <input name="" type="button" value="删除" id="articleDelete" />
            <input name="" type="button" value="移动" />
            <input name="" type="button" value="复制" />
        </td>
        </tr>
        <tr>
        <td align="center">
			<span>总共:<?php echo $this->_tpl_vars['num']; ?>
条信息</span>
        </td>
        <td colspan="7" align="left" id="pager">
        
        </td>
        </tr>
    </table>
 </div>
 </div>
 <div id="tabs-2" style="padding-left:0.2em;padding-right:0.4em;">
 <form method="post" action="index.php?m=column&a=edit">
    <table width="99%" border="0" align="center"  cellpadding="3" cellspacing="1" class="table_style">
      <tr>
        <td>栏目名称</td>
        <td><input type="text" name="classname" id="classname" value="<?php echo $this->_tpl_vars['column']['classname']; ?>
" /></td>
      </tr>
      <tr>
        <td>栏目别名</td>
        <td><input type="text" name="bname" id="bname" value="<?php echo $this->_tpl_vars['column']['bname']; ?>
" /></td>
      </tr>
      <tr>
        <td>所属栏目</td>
        <td>
        	<select name="bclassid">
            	<option value="0">顶级栏目</option>
                <?php $_from = $this->_tpl_vars['columns']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['val']):
?>
                <option value="<?php echo $this->_tpl_vars['val']['classid']; ?>
" <?php if ($this->_tpl_vars['val']['classid'] == $this->_tpl_vars['column']['bclassid']): ?>selected=selected<?php endif; ?>><?php echo $this->_tpl_vars['val']['classname']; ?>
</option>
                <?php endforeach; endif; unset($_from); ?>
            </select>
        </td>
      </tr>
      <tr>
        <td>栏目类型</td>
        <td><?php if ($this->_tpl_vars['column']['classtype'] == 'n'): ?>内部栏目<?php else: ?>外部栏目<?php endif; ?></td>
      </tr>
      <!--
      <tr>
        <td>是否终级栏目</td>
        <td>
        <select name="islast">
          <option value="1"<?php if ($this->_tpl_vars['column']['islast']): ?>selected="selected" <?php endif; ?>>是</option>
          <option value="0"<?php if (! $this->_tpl_vars['column']['islast']): ?>selected="selected" <?php endif; ?>>否</option>
        </select></td>
      </tr>
      -->
      <tr>
        <td>隐藏栏目</td>
        <td>
        <select name="display">
          <option value="0"<?php if (! $this->_tpl_vars['column']['display']): ?>selected="selected" <?php endif; ?>>是</option>
          <option value="1"<?php if ($this->_tpl_vars['column']['display']): ?>selected="selected" <?php endif; ?>>否</option>
        </select></td>
      </tr>
      <tr>
        <td>栏目存放文件夹</td>
        <td><input type="text" name="classpath" id="classpath" value="<?php echo $this->_tpl_vars['column']['classpath']; ?>
" />（相对于网站HTML默认保存路径）</td>
      </tr>
      <tr>
        <td>系统模型</td>
        <td>
        <select name="modid">
        <?php $_from = $this->_tpl_vars['mode']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['val']):
?>
        <option value="<?php echo $this->_tpl_vars['val']['mid']; ?>
"<?php if ($this->_tpl_vars['val']['mid'] == $this->_tpl_vars['column']['modid']): ?> selected="selected"<?php endif; ?>><?php echo $this->_tpl_vars['val']['mname']; ?>
</option>
        <?php endforeach; endif; unset($_from); ?>
        </select>
        </td>
      </tr>
      <tr>
        <td>绑定域名</td>
        <td><input type="text" name="domain" id="domain" value="<?php echo $this->_tpl_vars['column']['domain']; ?>
" /></td>
      </tr>
      <tr>
        <td>栏目缩略图</td>
        <td><input type="text" name="classimg" id="classimg" value="<?php echo $this->_tpl_vars['column']['classimg']; ?>
" /></td>
      </tr>
      <tr>
        <td>SEO标题</td>
        <td><input type="text" name="classtitle" id="classtitle" value="<?php echo $this->_tpl_vars['column']['classtitle']; ?>
" /></td>
      </tr>
      <tr>
        <td>页面关键字</td>
        <td><input type="text" name="classkeyword" id="classkeyword" value="<?php echo $this->_tpl_vars['column']['classkeyword']; ?>
" /></td>
      </tr>
      <tr>
        <td>栏目简介</td>
        <td><textarea name="intro" cols="intro" rows="4" style="width:500px;"><?php echo $this->_tpl_vars['column']['intro']; ?>
</textarea></td>
      </tr>
      <tr>
        <td>
          列表模板
       </td>
        <td><input type="text" name="listtemp" id="listtemp" value="<?php echo $this->_tpl_vars['column']['listtemp']; ?>
" /></td>
      </tr>
      <tr>
        <td>内容模板</td>
        <td><input type="text" name="contenttemp" id="contenttemp" value="<?php echo $this->_tpl_vars['column']['contenttemp']; ?>
" /></td>
      </tr>
      <tr>
        <td>栏目首页默认文件名</td>
        <td><input type="text" name="defaultname" id="defaultname" value="<?php echo ((is_array($_tmp=@$this->_tpl_vars['column']['defaultname'])) ? $this->_run_mod_handler('default', true, $_tmp, "index.html") : smarty_modifier_default($_tmp, "index.html")); ?>
" /></td>
      </tr>
      <tr>
        <td>栏目命名规则</td>
        <td><input type="text" name="classextension" id="classextension" value="<?php echo $this->_tpl_vars['column']['classextension']; ?>
" /></td>
      </tr>
      <tr>
        <td>内容页命名规则</td>
        <td><input type="text" name="contentextension" id="contentextension" value="<?php echo $this->_tpl_vars['column']['contentextension']; ?>
" /></td>
      </tr>
      <tr>
        <td>
          内容
       </td>
        <td><textarea name="content" cols="8" rows="6" style="width:500px;"><?php echo $this->_tpl_vars['column']['content']; ?>
</textarea></td>
      </tr>
      <tr>
        <td>
          <input type="hidden" name="classid" id="classid" value="<?php echo $this->_tpl_vars['column']['classid']; ?>
" />
          <input type="submit" name="" id="submit" value="提交" />
       </td>
        <td>&nbsp;</td>
      </tr>
    </table>
     </form>
 </div>
 </div>
</div>

<script type="text/javascript">
//<![CDATA[
CKEDITOR.replace( 'content' );
//]]>
CKFinder.SetupCKEditor(CKEDITOR, 'style/js/ckeditor/ckfinder/');
PageClick = function(pageclickednumber) {
	window.location = window.location.toString()+'&page='+pageclickednumber;
}
$("#pager").pager({ pagenumber: <?php echo $this->_tpl_vars['page']; ?>
, pagecount: <?php echo $this->_tpl_vars['pagecount']; ?>
, buttonClickCallback: PageClick });   
</script>
<div id="articleBox" style="display:none;">
</div>
</body>
</html>